package com.assignwork.vo;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import org.springblade.core.tool.utils.Func;

/**
 * (TrainStatisticsItem)VO
 * @since 2024-04-25 14:09:46
 */
@Data
@ApiModel(value = "TrainStatisticsItemVO", description = "")
public class TrainStatisticsItemVO  {

    public static final String SYZC = "SYZC";
    public static final String SZYSC = "SZYSC";
    public static final String HWZC = "HWZC";

    @JsonSerialize(using = ToStringSerializer.class)
    private Long parentId;

    private String workNode;

    private String cargoCategory;

    private String cargoType;
    private String cargoTypeName;

    private Integer amount;

    public boolean isSYZC() {
        return SYZC.equals(workNode);
    }

    public boolean notSZYSC() {
        return !SZYSC.equals(workNode);
    }

    public boolean isHWZC() {
        return HWZC.equals(workNode);
    }

    public TrainStatisticsItemVO toSZYSC() {
        setWorkNode(SZYSC);
        return this;
    }

}

